package pearson.automation.forms.courseDetails;

import org.openqa.selenium.By;

import framework.BaseForm;
import framework.elements.Button;
import framework.elements.Label;

public class CoursePublishCongratulations extends BaseForm {
    private static Button close = new Button(By.linkText("Close"), "Close");
    
    private static Label title       = new Label(By.xpath("(//dd)[1]"), "Title");
    private static Label subject     = new Label(By.xpath("(//dd)[2]"), "Subject");
    private static Label term        = new Label(By.xpath("(//dd)[3]"), "Term");
    private static Label startDate   = new Label(By.xpath("(//dd)[4]"), "Start Date");
    
    public CoursePublishCongratulations() {
        super(close.getLocator(), "Congratulations");
    }
    
    public CourseForm clickClose() {
        close.clickAndWait();
        return new CourseForm();
    }
    
    public String getTitle() {
        return title.getText();
    }
    
    public String getSubject() {
        return subject.getText();
    }
    
    public String getTerm() {
        return term.getText();
    }
    
    public String getStartDate() {
        return startDate.getText();
    }
}
